<?php
namespace  app\http\Service\Expert;

use App\Http\Service\Basic\BasicService;
use Config;

class ExpertService extends BasicService
{
    //构造函数
    function __construct(){
        parent::__construct();
    }

    public function Expert($where)
    {
        $url = '';
        if(isset($where['token'])){
            $url .='&token='.$where['token'];
        }
        if(isset($where['start_date']) && !empty($where['start_date'])){
            $url .='&start_date='.$where['start_date'];
        }
        if(isset($where['end_date']) && !empty($where['end_date'])){
            $url .='&end_date='.$where['end_date'];
        }
        dd(Config::get('custom.setting.BASE_API_PATH').Config::get('custom.api.expert').$url);
        return  $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH').Config::get('custom.api.expert').$url);
    }


    public function Detail($where)
    {
        $url = '';
        if(isset($where['token'])){
            $url .='&token='.$where['token'];
        }
        if(isset($where['course_id'])){
            $url .='&course_id='.$where['course_id'];
        }
        if(isset($where['page_no'])){
            $url .='&page_no='.$where['page_no'];
        }
        if(isset($where['start_date']) && !empty($where['start_date'])){
            $url .='&start_date='.$where['start_date'];
        }
        if(isset($where['end_date']) && !empty($where['end_date'])){
            $url .='&end_date='.$where['end_date'];
        }

//        dd(Config::get('custom.setting.BASE_API_PATH').Config::get('custom.api.detail').$url);
        return  $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH').Config::get('custom.api.detail').$url);
    }

}